package com.mydemo.springlearning.functions.CRUDdemo.byannotation.controller;

import com.mydemo.springlearning.functions.CRUDdemo.entity.Db2User;
import com.mydemo.springlearning.functions.CRUDdemo.byannotation.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("user2")
public class Db2UseController {

    @Autowired
    private IUserService iUserService;

    @RequestMapping("list")
    public List<Db2User> list(){
        return iUserService.list();
    }

}
